import * as Utils from 'utils.js'

//提示框
export function showTip(msg) {
	uni.showToast({
		position: 'bottom',
		title: msg,
		duration: 1000,
		style: "z-index:9999",
	});
};




//确认框
export function showConfirm(msg, sureClick) {
	uni.showModal({
		title: '提示',
		content: msg,
		success: function(res) {
			if (res.confirm) {
				sureClick(true);
			} else if (res.cancel) {
				sureClick(false);
			}
		}
	});
};

/**
 * @param {Object} GoodImagePath采购类查供应商的接口
 */
export function Get_ClientMessage(arr,callBack) {
	let url = Utils.getPostIp("/api/Get_ClientMessage");
	var responseArr = {};
	let data = Utils.getData(arr);
	Utils.httpGetClient(url, data, "GET", function(data,state) {
		responseArr.data = data.data;
		responseArr.state = state;
		callBack(responseArr);
	});
}


//Vip卡
export function Get_MemberMessage(arr, callBack) {
	let url = Utils.getPostIp("/api/Get_MemberMessage");
	var responseArr = {};
	let data = Utils.getData(arr);
	Utils.httpGetClient(url, data, "GET", function(data, state) {
		responseArr.data = data.data;
		responseArr.state = state;
		callBack(responseArr);
	});
}



//查询批次(盘点单)
export function GetInventoryMessage(arr, callBack) {
	let url = Utils.getPostIp("/api/Get_InventoryMessage");
	var responseArr = {};
	let data = Utils.getData(arr);
	Utils.httpGetClient(url, data, "GET", function(data, state) {
		responseArr.data = data.data;
		responseArr.state = state;
		callBack(responseArr);
	});
}